fix(assets-controller): consume account activity#9517
Open
Kriys94 wants to merge 4 commits into
Open
Conversation
Kriys94
force-pushed
the
fix/AssetsAccountActivity
branch
4 times, most recently
from
July 20, 2026 08:07
3ddda90 to
d937cef
Compare
Kriys94
force-pushed
the
fix/AssetsAccountActivity
branch
from
July 22, 2026 14:15
90dafcd to
150e8b9
Compare
Kriys94
marked this pull request as ready for review
July 22, 2026 14:15
Kriys94
force-pushed
the
fix/AssetsAccountActivity
branch
2 times, most recently
from
July 22, 2026 15:25
f9b8d3c to
a44a1c0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a44a1c0. Configure here.
Kriys94
force-pushed
the
fix/AssetsAccountActivity
branch
from
July 22, 2026 15:44
a44a1c0 to
d1c1b1e
Compare
Kriys94
force-pushed
the
fix/AssetsAccountActivity
branch
from
July 24, 2026 14:46
0db2a63 to
57ead5d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Explanation
References
Checklist
Note
High Risk
Breaking removal of BackendWebsocketDataSource and a new top-priority real-time balance path affect core asset tracking and chain assignment; integration mistakes (messenger/events or AccountActivityService ownership) could cause missing balances or duplicate polling.
Overview
BREAKING: Removes
BackendWebsocketDataSourceand allBackendWebSocketServicemessenger wiring fromAssetsController. Real-time balances and per-chain up/down status now flow only throughAccountActivityDataSource, which listens toAccountActivityService:balanceUpdatedandAccountActivityService:statusChangedand pushes updates via an injectedonAssetsUpdatecallback (no separate controller subscription).AccountActivityDataSourceis the first balance source in the chain-claiming order: chains reported up onstatusChangedare reserved for WebSocket-driven updates soAccountsApiDataSource/RpcDataSourcedo not poll them. Custom-asset graduation and docs/tests are updated to nameAccountActivityDataSourceinstead of the websocket data source.When data sources report active-chain changes,
AssetsControllernow#scheduleSubscribeAssetsinstead of calling#subscribeAssetsimmediately: 250ms debounce plus up to 5s jitter, with the earliest scheduled run winning when multiple updates overlap.#stopclears the pending timer; when the timer fires it re-checks UI open, keyring unlocked, andisEnabled()so a re-subscribe cannot restart polling after tracking was torn down.Network-switch refresh no longer calls websocket data-source
refreshActiveChains(only Accounts API + RPC).Reviewed by Cursor Bugbot for commit 57ead5d. Bugbot is set up for automated code reviews on this repo. Configure here.